package day1;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class test3 {
    //小文件拷贝(边读边写）
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\桌面\\fee.dat");
        FileOutputStream fos = new FileOutputStream("D:\\java\\basic\\io\\src\\day1\\1.txt");

        int b;
        while((b=fis.read())!=-1) {
            fos.write(b);
        }

        //释放：先开的后释放
        fos.close();
        fis.close();
    }
}
